package com.example.domain.usecase;

import com.example.domain.entity.Post;
import com.example.domain.repo.JsonPlaceHolderRepo;
import com.example.domain.result.Result;

import java.util.List;

import javax.inject.Inject;

public class GetAllUserUseCase extends UseCase<Void, Result<List<Post>>>{

    private JsonPlaceHolderRepo jsonPlaceHolderRepo;

    @Inject
    public GetAllUserUseCase(JsonPlaceHolderRepo jsonPlaceHolderRepo){
        this.jsonPlaceHolderRepo = jsonPlaceHolderRepo;
    }

    @Override
    public Result<List<Post>> execute(Void params) {
        return jsonPlaceHolderRepo.getAllPost();
    }
}